
package com.welsy.user.business
{
	import mx.rpc.Fault;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.soap.mxml.WebService;	
	import mx.rpc.AbstractOperation;
	import com.adobe.cairngorm.business.ServiceLocator;
	import mx.collections.ArrayCollection;
	import flash.utils.setTimeout;	
	import com.welsy.authoring.vo.CourseVO;
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
		

	/**
	 * @version	$Revision: 1.1 $
	 */
	public class GetUserPendingCoursesDelegate
	{
		public function GetUserPendingCoursesDelegate( responder : IResponder )
		{		
			this.service = ServiceLocator.getInstance().getWebService("TrackService") as WebService;
			this.responder = responder;
		}
		
		public function getPendingCourses(userId : String, status : int) : void
		{	
			//Create the request
			var op : AbstractOperation = service.getOperation("GetUserPendingCourses");
			op.arguments.GetUserCoursesRequest.UserId = userId;
			op.arguments.GetUserCoursesRequest.Status = String(status);
			
			var token : AsyncToken = service.GetUserPendingCourses();
			token.addResponder(responder);
		}
	
		private var responder : IResponder;
		private var service : WebService;
	}

}